import {
  Controller,
  Get,
  Query,
} from '@nestjs/common';
import { LittleThingService } from './little-thing.service';
import { ApiOperation, ApiTags } from '@nestjs/swagger';
import { GetLittleThingDTO } from './little-thing.dto';

@Controller({
  path: 'little-thing',
  version: '1',
})
@ApiTags('littleThing')
export class LittleThingController {
  constructor(private readonly littleThingService: LittleThingService) {}

  @Get('list')
  @ApiOperation({ summary: '恋爱清单列表' })
  getLittleThing(@Query() param: GetLittleThingDTO) {
    return this.littleThingService.getLittleThing(
      param.ThingName,
      param.Page,
      param.PageSize,
    );
  }
}
